import BasicLayout from '../../layouts/index.vue';
import Config from "@/config";

export default [
    {
        path: '/',
        redirect: Config.mainUrl
    },
    {
        path: '/workspace',
        redirect: '/workspace/workbench',
        component: BasicLayout,
        meta: {title: '工作空间'},
        children: [
            {
                path: '/workspace/workbench',
                name: 'Workbench',
                component: () => import('../../views/workSpace/workbench/index.vue'),
                meta: {title: '工作台', affix: true, closable: false},
            },
            {
                path: '/workspace/console',
                component: () => import('../../views/workSpace/console/index.vue'),
                meta: {title: '控制台'},
            },
            {
                path: '/workspace/analysis',
                component: () => import('../../views/workSpace/analysis/index.vue'),
                meta: {title: '分析页'},
            },
            {
                path: '/workspace/monitor',
                component: () => import('../../views/workSpace/monitor/index.vue'),
                meta: {title: '监控页'},
            }
        ]
    }, {
        path: '/error',
        component: BasicLayout,
        meta: {title: '错误页面'},
        children: [
            {
                path: '/error/401',
                component: () => import('../../views/error/401.vue'),
                meta: {title: '401'},
            },
            {
                path: '/error/403',
                component: () => import('../../views/error/403.vue'),
                meta: {title: '403'},
            },
            {
                path: '/error/404',
                component: () => import('../../views/error/404.vue'),
                meta: {title: '404'},
            },
            {
                path: '/error/500',
                component: () => import('../../views/error/500.vue'),
                meta: {title: '500'},
            }
        ]
    }, {
        path: '/system',
        component: BasicLayout,
        meta: {title: '系统管理'},
        children: [
            {
                path: '/system/user',
                component: () => import('../../views/system/user/index.vue'),
                meta: {title: '用户管理'},
            },
            {
                path: '/system/role',
                component: () => import('../../views/system/role/index.vue'),
                meta: {title: '角色管理'},
            },
            {
                path: '/system/menu',
                component: () => import('../../views/system/menu/index.vue'),
                meta: {title: '菜单管理'},
            },
            {
                path: '/system/organization',
                component: () => import('../../views/system/organization/index.vue'),
                meta: {title: '机构管理'},
            },
            {
                path: '/system/dictionary',
                component: () => import('../../views/system/dictionary/index.vue'),
                meta: {title: '字典管理'},
            },
            {
                path: '/system/file',
                component: () => import('../../views/system/file/index.vue'),
                meta: {title: '文件管理'},
            },
            {
                path: '/system/login',
                component: () => import('../../views/system/login/index.vue'),
                meta: {title: '登录日志'},
            },
            {
                path: '/system/option',
                component: () => import('../../views/system/option/index.vue'),
                meta: {title: '操作日志'},
            },
        ]
    }, {
        path: '/result',
        component: BasicLayout,
        meta: {title: '错误页面'},
        children: [
            {
                path: '/result/success',
                component: () => import('../../views/result/success.vue'),
                meta: {title: '成功页面'},
            },
            {
                path: '/result/failure',
                component: () => import('../../views/result/failure.vue'),
                meta: {title: '失败页面'},
            },
        ]
    }, {
        path: '/list',
        component: BasicLayout,
        meta: {title: '列表页面'},
        children: [
            {
                path: '/table/base',
                component: () => import('../../views/table/base.vue'),
                meta: {title: '查询列表'},
            },
            {
                path: '/table/card',
                component: () => import('../../views/table/card.vue'),
                meta: {title: '卡片列表'},
            },
            {
                path: '/table/project',
                component: () => import('../../views/table/project.vue'),
                meta: {title: '项目列表'},
            },
            {
                path: '/table/article',
                component: () => import('../../views/table/article.vue'),
                meta: {title: '文章列表'},
            }
        ]
    }, {
        path: '/form',
        component: BasicLayout,
        meta: {title: '表单页面'},
        children: [
            {
                path: '/form/base',
                component: () => import('../../views/form/base.vue'),
                meta: {title: '基础表单'},
            },
            {
                path: '/form/step',
                component: () => import('../../views/form/step.vue'),
                meta: {title: '分步表单'},
            },
            {
                path: '/form/intricate',
                name: 'Intricate',
                component: () => import('../../views/form/intricate.vue'),
                meta: {title: '复杂表单'},
            },
            {
                path: '/form/step',
                name: 'Step',
                component: () => import('../../views/form/step.vue'),
                meta: {title: '分步表单'},
            },
        ]
    }, {
        path: '/directive',
        component: BasicLayout,
        meta: {title: '内置指令'},
        children: [
            {
                path: '/directive/permission',
                component: () => import('../../views/directive/permission.vue'),
                meta: {title: '权限指令'},
            },
        ]
    },

    {
        path: '/component',
        component: BasicLayout,
        meta: {title: '常用组件'},
        children: [
            {
                path: '/component/qrcode',
                component: () => import('../../views/component/qrcode.vue'),
                meta: {title: '二维码'},
            },
            {
                path: '/component/barcode',
                component: () => import('../../views/component/barcode.vue'),
                meta: {title: '条形码'},
            },
            {
                path: '/component/tree',
                component: () => import('../../views/component/tree.vue'),
                meta: {title: '树'},
            },
            {
                path: '/component/treeSelect',
                component: () => import('../../views/component/treeSelect.vue'),
                meta: {title: '下拉树'},
            },
            {
                path: '/component/selectFilter',
                component: () => import('../../views/component/selectFilter.vue'),
                meta: {title: '分类筛选器'},
            },
            {
                path: '/component/tableSelect',
                component: () => import('../../views/component/tableSelect.vue'),
                meta: {title: '表格选择器'},
            }, {
                path: '/component/pcasCascader',
                component: () => import('../../views/component/pcasCascader.vue'),
                meta: {title: '省市区选择器'},
            },
            {
                path: '/component/icon',
                component: () => import('../../views/component/icon.vue'),
                meta: {title: '图标组件'},
            },
            {
                path: '/component/iconInput',
                component: () => import('../../views/component/iconInput.vue'),
                meta: {title: '图标输入组件'},
            },
        ]
    },
    {
        path: '/page',
        component: BasicLayout,
        meta: {title: '外部页面'},
        children: [
            {
                path: '/page/layer',
                component: () => import('../../views/enrollee/profile/index.vue'),
                meta: {title: '我的资料'},
            },
            {
                path: '/page/link',
                component: () => import('@/layouts/view/link.vue'),
                meta: {title: '外链'},
            },
            {
                path: '/page/iframe',
                component: () => import('@/layouts/view/iframe.vue'),
                meta: {title: '内嵌'},
            },
        ]
    },

    {
        path: '/enrollee',
        component: BasicLayout,
        meta: {title: '个人中心'},
        children: [
            {
                path: '/enrollee/profile',
                component: () => import('../../views/enrollee/profile/index.vue'),
                meta: {title: '我的资料'},
            },
            {
                path: '/enrollee/message',
                component: () => import('../../views/enrollee/message/index.vue'),
                meta: {title: '我的消息'},
            },

        ]
    },


]
